package com.funny.config;

import org.springframework.cache.CacheManager;
import org.springframework.cache.caffeine.CaffeineCacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * @author Ming
 * @description Caffeine 缓存
 * @fileSimpleName CacheConfiguration
 * @fileName com.funny.config.CacheConfiguration
 * @date 2024年06月28日 18:08
 */
@Component
public class CacheConfiguration {
    @Bean
    public CacheManager cacheManager() {
        return new CaffeineCacheManager("Caffeine-Cache");
    }
}
